#ifndef __ANALYSIS_H__
#define __ANALYSIS_H__

#ifdef __cplusplus
extern "C" {
#endif
#include "serial-ops.h"

#define GGA_VALID	0x1
#define RTCM_VALID	0x2
#define SEND_VALID	(GGA_VALID|RTCM_VALID)

struct rtcm_type
{
	char gsp[RTCM_SINGLE];
	char beidou[RTCM_SINGLE];
};

struct rtcm_splice
{
	struct rtcm_type type;
	char transfer[RTCM_LEN];
};

struct package
{
	char gga_ac[GGA_LEN];
	char gga_bd[GGA_LEN];

	struct rtcm_splice rtcm_ac;
	struct rtcm_splice rtcm_bd;

	char angle[16];
	char flag_ac;
	char flag_bd;
};

extern struct package pk;

int receive_data_analy(int len, unsigned char * rev_buf);
int receive_data_analy_bd(int len, unsigned char * rev_buf);



#ifdef __cplusplus
}
#endif

#endif /* __ANALYSIS_H__ */
